import {get, post } from '@/Utils/Http'
import port from './port'
import Cookies from 'js-cookie'


export function getTemplateData(id) {
    return post(port.avg.getTemplateData + id, { st: Cookies.get('token') })
}
export function GetGiftData(id) {
    return post(port.avg.GetGiftData + id, { st: Cookies.get('token') })
}
export function GetTaskData(id) {
    return post(port.avg.GetTaskData + id, { st: Cookies.get('token') })
}

export function GetLimitedGift(id) {
    return post(port.avg.GetLimitedGift + id, { st: Cookies.get('token') })
}
export function RcvGloryGift({ id, type, level }) {
    return post(port.avg.RcvGloryGift + id, { type: type, level: level, st: Cookies.get('token') })
}
export function RcvTask({ id, type, tid }) {
    return post(port.avg.RcvTask + id, { type: type, tid: tid, st: Cookies.get('token') })
}
export function RcvSelfTask({ id, ty }) {
    return post(port.avg.RcvSelfTask + id, { ty: ty, st: Cookies.get('token') })
}

export function RefreshTask(id) {
    return post(port.avg.RefreshTask + id, { st: Cookies.get('token') })
}
export function GetShop11Pay({ id, amount, gid }) {
    return post(port.avg.GetShop11Pay + id, { amount: amount, id: gid, st: Cookies.get('token') })
}

export function RcvLimitedGift({ id, sort }) {
    return post(port.avg.RcvLimitedGift + id, { sort: sort, st: Cookies.get('token') })
}

export function LimitedHistory({ id }) {
    return post(port.avg.LimitedHistory + id, { st: Cookies.get('token') })
}

export function QueryHistory({ id }) {
    return post(port.avg.QueryHistory + id, { st: Cookies.get('token') })
}

export function GetAllActivity({ mid }) {
    return get(port.avg.GetAllActivity, { mid: mid, st: Cookies.get('token') })
}

export function RcvFreePrimaryPass({ id }) {
    return get(port.avg.RcvFreePrimaryPass + id, { st: Cookies.get('token') })
}